package com.share.module.sys.menu.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 菜单
 * </p>
 *
 * @author lijy
 * @since 2023-04-17
 */
@Data
@TableName("sys_menu")
@Schema(description = "菜单")
public class Menu implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "主键", example = "1")
    private Integer id;

    /**
     * 父级id
     */
    @Schema(description = "父级id", example = "0")
    private Integer pid;

    /**
     * 名称
     */
    @Schema(description = "名称", example = "系统管理")
    private String name;

    /**
     * 路径
     */
    @Schema(description = "路径", example = "/system")
    private String path;

    /**
     * 图标
     */
    @Schema(description = "图标", example = "el-icon-setting")
    private String icon;

    /**
     * 描述
     */
    @Schema(description = "描述", example = "系统管理模块")
    private String description;

    /**
     *
     */
    @TableField(exist = false)
    @Schema(description = "子类")
    private List<Menu> children;

    @Schema(description = "页面路径", example = "/system/index")
    private String pagePath;
}
